home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc / Sample Code / Sample Editors⁄Viewers / Sound Editor / Source / SoundEditorGlobals.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-11  |  3.0 KB  |  132 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        SoundEditorGlobals.h
  3.  
  4.     Contains:    SoundEditor globals
  5.  
  6.     Written by:    Steve Smith
  7.  
  8.     Copyright:    © 1995 by Apple Computer, Inc., all rights reserved.
  9. */
  10.  
  11.  
  12. #ifndef _SOUNDEDITORGLOBALS_
  13. #define _SOUNDEDITORGLOBALS_
  14.  
  15. // -- OpenDoc --
  16.  
  17. #ifndef _ODTYPES_
  18. #include <ODTypes.h>
  19. #endif
  20.  
  21. #ifndef _ITEXT_
  22. #include <IText.h>
  23. #endif
  24.  
  25. //------------------------------------------------------------------------------
  26. // Forward declarations
  27. //------------------------------------------------------------------------------
  28.  
  29. class ODMenuBar;
  30. class ODFocusSet;
  31.  
  32. struct SoundEditorGlobals;
  33.  
  34. //------------------------------------------------------------------------------
  35. // Globals
  36. //------------------------------------------------------------------------------
  37.  
  38. extern    ODUShort            gGlobalsUsageCount;
  39. extern    SoundEditorGlobals*    gGlobals;
  40.  
  41. //------------------------------------------------------------------------------
  42. // SoundEditorGlobals struct
  43. //------------------------------------------------------------------------------
  44.  
  45. struct SoundEditorGlobals 
  46. {
  47.     SoundEditorGlobals();
  48.  
  49.     ODMenuBar*        fMenuBar;
  50.     ODFocusSet*        fUIFocusSet;
  51.  
  52.     Handle            fThumbnail;
  53.     Handle            fControlsPict;
  54.     
  55.     ODTypeToken        fSelectionFocus;
  56.     ODTypeToken        fMenuFocus;
  57.     ODTypeToken        fKeyFocus;
  58.     ODTypeToken        fModalFocus;
  59.     ODTypeToken        fClipboardFocus;
  60.     ODTypeToken        fSoundInFocus;
  61.     ODTypeToken        fSoundOutFocus;
  62.  
  63.     ODTypeToken        fFrameView;
  64.     ODTypeToken        fLargeIconView;
  65.     ODTypeToken        fSmallIconView;
  66.     ODTypeToken        fThumbnailView;
  67.     ODTypeToken        fControlsPresentation;
  68.  
  69.     ODValueType        fSndDataKind;
  70.     ODValueType        fSndFileKind;
  71.     ODValueType        fAppleHFSFlavor;
  72.  
  73.     ODTypeToken        fNativeData;
  74.     ODTypeToken        fMacSndData;
  75.     ODTypeToken        fMacSndFile;
  76.         
  77.     ODScriptCode    fEditorsScript;
  78.     ODLangCode        fEditorsLanguage;
  79.  
  80.     Rect            fButtonRect[4];
  81.     Rect            fSpeakerIconRect;
  82.     Rect            fMaxTimeRect;
  83.     Rect            fCurrentTimeRect;
  84.     Rect            fProgressBarRect;
  85. };
  86.  
  87.  
  88. inline SoundEditorGlobals::SoundEditorGlobals()
  89. {
  90.     fMenuBar                = kODNULL;
  91.     fUIFocusSet                = kODNULL;
  92.  
  93.     fThumbnail                = kODNULL;
  94.     fControlsPict            = kODNULL;
  95.             
  96.     fSelectionFocus            = kODNullTypeToken;
  97.     fMenuFocus                = kODNullTypeToken;
  98.     fKeyFocus                = kODNullTypeToken;
  99.     fModalFocus                = kODNullTypeToken;
  100.     fClipboardFocus            = kODNullTypeToken;
  101.     fSoundInFocus            = kODNullTypeToken;
  102.     fSoundOutFocus            = kODNullTypeToken;
  103.  
  104.     fFrameView                = kODNullTypeToken;
  105.     fLargeIconView            = kODNullTypeToken;
  106.     fSmallIconView            = kODNullTypeToken;
  107.     fThumbnailView            = kODNullTypeToken;
  108.     fControlsPresentation    = kODNullTypeToken;
  109.  
  110.     fSndDataKind            = kODNULL;
  111.     fSndFileKind            = kODNULL;
  112.     fAppleHFSFlavor            = kODNULL;
  113.  
  114.     fNativeData                = kODNullTypeToken;
  115.     fMacSndData                = kODNullTypeToken;
  116.     fMacSndFile                = kODNullTypeToken;
  117.     
  118.     fEditorsScript            = 0;
  119.     fEditorsLanguage        = 0;
  120.     
  121.     SetRect(&fButtonRect[0],   7, 8,  42, 33);
  122.     SetRect(&fButtonRect[1],  51, 8,  86, 33);
  123.     SetRect(&fButtonRect[2],  95, 8, 130, 33);
  124.     SetRect(&fButtonRect[3], 139, 8, 174, 33);
  125.  
  126.     SetRect(&fSpeakerIconRect, 190,  5, 228, 41);
  127.     SetRect(&fMaxTimeRect,     153, 70, 183, 80);
  128.     SetRect(&fCurrentTimeRect, 194, 56, 228, 69);
  129.     SetRect(&fProgressBarRect,   8, 60, 173, 69);
  130. }
  131.  
  132. #endif